package io.kiki.sba.registry.server.clientInterface.providedata;

import io.kiki.sba.registry.server.clientInterface.bootstrap.Config;
import io.kiki.sba.registry.server.shared.providedata.AbstractProvideDataWatcher;
import org.springframework.beans.factory.annotation.Autowired;

public class ConfigProvideDataWatcher extends AbstractProvideDataWatcher {
    @Autowired
    protected Config config;

    public ConfigProvideDataWatcher() {
        super("config");
    }

    @Override
    protected int fetchBatchSize() {
        return config.getWatchConfigFetchBatchSize();
    }

    @Override
    protected int fetchIntervalMillis() {
        return config.getWatchConfigFetchIntervalMillis();
    }

    @Override
    protected int watcherLeaseSecs() {
        return config.getWatchConfigFetchLeaseSecs();
    }
}
